package SimpleFactoryMode.version1;

import java.util.Scanner;

/**
 * Created by ycq on 2018/9/7.
 */
public class version1 {
    public static void main(String[] args) {
        Scanner in =new Scanner(System.in);
        System.out.println("请输入数字A");
        String A=in.nextLine();
        System.out.println("请选择运算符号（+，-，*，/）：");
        String C=in.nextLine();
        System.out.println("请输入数字B");
        String B=in.nextLine();
        String D="";
        if(C.equals("+"))
            D=String.valueOf(Double.parseDouble(A)+Double.parseDouble(B));
        if(C.equals("-"))
            D=String.valueOf(Double.parseDouble(A)-Double.parseDouble(B));
        if(C.equals("*"))
            D=String.valueOf(Double.parseDouble(A)*Double.parseDouble(B));
        if(C.equals("/"))
            D=String.valueOf(Double.parseDouble(A)/Double.parseDouble(B));
        System.out.println("结果是"+D);
    }













}
